define([
    'require',
], function(require, factory) {
    'use strict';
    /**
     * 单例图层
     */
    let Imagery = (()=>{
        let instance;
        function Imagery(){
            if(instance){
                return instance;
            }else{
                instance = this;
            }
        }
        return Imagery;
    })();

    Object.defineProperties(Imagery.prototype, {
        /**
         * esri图层
         */
        esri : {
            get : ()=> new Cesium.ArcGisMapServerImageryProvider({
                url: 'https://services.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer'
            })
        },
        /**
         * 必应图层
         */
        bing : {
            get : ()=> new Cesium.BingMapsImageryProvider({
                url: 'https://dev.virtualearth.net',
                key: 'AsWQjic0L8bjs74oEQK050kJ3RLqTbuthBdxwhhKKKCRSA8t0Z1O7fK41MTxvadY',
                mapStyle: Cesium.BingMapsStyle.AERIAL
            })
        },
        /**
         * osm图层
         */
        osm : {
            get : ()=> Cesium.createOpenStreetMapImageryProvider({
                url: 'https://a.tile.openstreetmap.org/'
            })
        },
        /**
         * gee图层
         */
        gee : {
            get : ()=> new Cesium.GoogleEarthEnterpriseImageryProvider({
                metadata: new Cesium.GoogleEarthEnterpriseMetadata('http://www.earthenterprise.org/3d')
            })
        },
        ino : {
            get : ()=> new Cesium.IonImageryProvider({ assetId: 23489024 })
        },
        /**
         * mapbox图层
         */
        mapbox : {
            get : ()=> new Cesium.MapboxImageryProvider({
                mapId: 'mapbox.satellite',
                accessToken : 'pk.eyJ1Ijoic29tZXUiLCJhIjoiY2ppYmcxeTM0MWhodTN1cGZ5bjRjdGF6MCJ9.MfOrj_AAu6vK33Pxj8cPRA'
            })
        },
        /**
         * 图片图层
         */
        image : {
            get : ()=> new Cesium.SingleTileImageryProvider({
                url : '../static/img/lay.jpg',
                rectangle : Cesium.Rectangle.fromDegrees(73.48962, 3.833843, 135.087387, 55.558498)
            })
        }
    })
    return Imagery;
});